<?php 
require_once '../include/includefiles.php';
require_once '../include/userislogin.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户修改</title>
<link href="images/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="images/jquery-1.7.2.min.js"></script>
</head>

<body>
<form name="form1" method="post" action="actions.php?act=role_menu_add">
<table width="100%" align="center" bgcolor="#F7F8F9">
  <tr bgcolor="#E1E5EE">
    <td height="30" colspan="2" align="center" bgcolor="#F2F2F2">角色权限新增</td>
  </tr>
  <tr align="center">
    <td width="50%" height="25" align="right">角色：</td>
    <td width="50%" height="25" align="left"><select name="roles" id="roles">
    <?php 
      $query = "select * from role";
      $result = mysql_query($query);
      while ($row=mysql_fetch_array($result)) {
      	$id=$row['id'];
      	$name = $row['name'];
      	echo "<option value=".$id.">".$name."</option>";
      }
    ?>
        </select>  </td>
  </tr>
 
  <tr align="center">
    <td height="25" align="right" valign="middle">菜单：</td>
    <td height="25" align="left" valign="middle">
        <select name="right">
        </select>
    </td>
  </tr>
  <tr align="center">
    <td height="25" colspan="2" valign="middle">
      <input type="submit" name="Submit" value="确认">    </td>
  </tr>
 
</table>
</form>
<script type="text/javascript">
$.post('actions.php?act=menutree',function(data){
	  $("[name='right']").append(data);
});
</script>
</body>
</html>
